Big finish environment variables for characters and series mapping - #25
Big finish environment variables for characters and series mapping#25SAS-1 wants to merge 9 commits into
Conversation
…ags in line with original version. Testing
Updated the GitHub Actions workflow to log in to the GitHub Container Registry and simplified the Docker image build process by removing metadata extraction.
* 'main' of https://github.com/SAS-1/abs-bigfinishv2: Update Docker login and build process in workflow
…d series mapping to app/data folder to allow people to edit if wanted.
Vito0912
left a comment
There was a problem hiding this comment.
Thanks. I think doing that via parameters makes more sense. Then every user can decide for themself.
Do you think something speaks against that? If so just add a comment
| const isEnvEnabled = (value: string | undefined): boolean => value?.trim().toLowerCase() === 'true' | ||
| const ENABLE_SERIES_MAPPING = isEnvEnabled(process.env.seriesmapping) | ||
| const ENABLE_CHARACTERS = isEnvEnabled(process.env.characters) |
There was a problem hiding this comment.
I think that would better fit as an parameter for the provider via the config so that each user can decide for themselfs
| # Big Finish | ||
| # Big Finish Series Mapping. This is used to map the series names Big Finish | ||
| # uses to a more appropriate name for working with ABS and to try and merge seroes together where needed it can be customized to your own needs. | ||
| # The default mapping is below. If you want to use your own mapping, create a file called series_mapping.json in the config | ||
| # folder with your own mapping. | ||
| # | ||
| # Doctor stories are mapped to D[1-13] | ||
| # Friends of the Doctor stories are mapped to F[1-8] | ||
| # Torchwood stories are mapped to T[0-3] | ||
| # | ||
| # seriesmapping=true | ||
| # | ||
| # Big Finish Character's. This flag will save the character's as tags in ABS allowing you to search for stories by character. | ||
| # characters=true |
| # Big Finish Env Variables | ||
| - characters=false | ||
| - seriesmapping=false |
| | 'characters' | boolean | true/false | allows characters to be returned as tags | | ||
| | 'seriesmapping' | boolean | true/false | series mapping to standard fileds | |
There was a problem hiding this comment.
Exactly like this then. These are for the config.json and are generated from the script, defined in package.json
| "description": "Maximum number of results to return (default: 3, max: 5)" | ||
| } | ||
| ], | ||
| "returnedFields": [ |
There was a problem hiding this comment.
Each provider's config.json file defines the parameters they accept. In ABS, you can use these parameters in the following format:
http://<domain>/<provider>/<parameter>
For example, to set a custom limit, you would use:
http://<domain>/<provider>/limit:5
This allows each user to decide what they want to retrieve, rather than applying the same settings to the entire provider. While users cannot change the character mapping, they can decide whether or not to use it. Currently, the configuration is applied to all requests. You can look at other requests to understand how to use more complex parameters.



this PR enables some additional functionality on the Big Finish scrapper
It uses ENV Variables to control these and they are switched off by default the 2 variables are
seriesmapping and characters
with these enabled the options will appear in the metadata update details screen
the series mapping is written in a way to allow people to mount the JSON and write their own mapping as it is subjective.
Both can be ignored without causing breaking changes.